#ifndef __TOOLS_H__
#define __TOOLS_H__

#if defined(HW_RVL)

#include <gctypes.h>
#include "filelog.h"

#ifdef __cplusplus
   extern "C" {
#endif /* __cplusplus */

//#define DOLPHIN

#define PRINT_HEX_ERROR(S,E) (printf("%s%c0x%X [No Entry]\n",(S),((E)<0)?'-':' ',((E)<0)?-(E):(E)))
#define MAX_CHARACTERS(x) ((sizeof((x))) / (sizeof((x)[0]))) 

// Colors for console output
#define	BLACK	"\x1b[30;0m"
#define	GRAY	"\x1b[30;1m"
#define	RED		"\x1b[31;1m"
#define	GREEN	"\x1b[32;1m"
#define	YELLOW	"\x1b[33;1m"
#define BLUE    "\x1b[34;1m"
#define PURPLE  "\x1b[35;0m"
#define MAGENTA "\x1b[35;1m"
#define CYAN    "\x1b[36;1m"
#define	WHITE	"\x1b[37;1m"

// Remeber to set it back to WHITE when you're done
#define CHANGE_COLOR(X)	(printf((X)))

#define CLEAR_SCREEN() (printf("\x1b[2J"))

extern char bias_time[22];
extern bool NetworkInitialized;

void Banner(const char *title);
void Initialize(void);
void Deinitialize(void);
void PrintText(const char *name);
void PrintValue1(const char *text, const char **options, s32 val);
void PrintValue2(const char *text, s8 * hexval, u8 length);
void pressanykey(void);
void CB2Date(u32 cb);


#ifdef __cplusplus
   }
#endif /* __cplusplus */

#endif

#endif